package
{
	import anshe.event.AnsheClientEvent;
	import anshe.widget.AnsheClient;

	public class TestGame extends AnsheClient
	{
		public function TestGame(gName:String, swfName:String)
		{
			super("Test", "Test001");
		}
		
		protected override function InitGame():void
		{
			super.InitGame();
			
			Init(); //初始化
			
			this.addEventListener(AnsheClientEvent.UPDATA_ROOM_INFO, onRushRoomInfo);
			this.addEventListener(AnsheClientEvent.UPDATA_PLAYER_INFO, onRushUserInfo);
			this.addEventListener(AnsheClientEvent.UPDATA_GAME_DATA, onRushGameData);
			
			JoinGame(); 		//	加入游戏
		}
		
		private function onRushRoomInfo(e:AnsheClientEvent):void
		{
			
		}
		
		private function onRushUserInfo(e:AnsheClientEvent):void
		{
			
		}
		
		private function onRushGameData(e:AnsheClientEvent):void
		{
			
		}		
		
		//	返回针对当前游戏的房间信息
		protected override function GetGameRoomInfo(obj:Object):IStruct
		{			
			return null;
		}
		
		//	返回针对当前游戏的游戏玩家信息
		protected override function GetGamePlayerInfo(obj:Object):IStruct
		{
			return null
		}
		
		protected override function GetGameDataInfo(obj:Object):IStruct
		{
			return null;
		}

		protected override function DeleteListener():void
		{
			if(this.roomSO)
			{
				this.roomSO.close();
			}
			if(this.gameSO)
			{
				this.gameSO.close();
			}
			
			//  
		}
	}
}